﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace xiaolanshu
{
    public partial class lipdetail : Form
    {
        public static DataTable lipstick_data;
        public static SqlDataAdapter lipstick_adapter;
        public static SqlCommandBuilder lipstick_builder;
        public lipdetail()
        {
            InitializeComponent();
        }

        private void lipdetail_Load(object sender, EventArgs e)
        {
            BackgroundImageLayout = ImageLayout.Stretch;
            string sqlstr = "select * from lipstick_infomation where lnum = '" + 产品信息.productnum + "'";
            SqlConnection conn = SQLTools.conn;
            lipstick_adapter = new SqlDataAdapter(sqlstr, conn);
            lipstick_builder = new SqlCommandBuilder(lipstick_adapter);

            lipstick_data = new DataTable();
            lipstick_adapter.Fill(lipstick_data);

            //lipstick_data.Columns.Add(new DataColumn("index", System.Type.GetType("System.Int32")));

            label2.Text = lipstick_data.Rows[0][1].ToString();
            label3.Text = lipstick_data.Rows[0][2].ToString();
            label9.Text = lipstick_data.Rows[0][3].ToString();
            dateTimePicker1.Value = DateTime.Parse(lipstick_data.Rows[0][5].ToString());
            label10.Text = lipstick_data.Rows[0][4].ToString() + "g";
        }
    }
}
